package com.int_tech.user.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import sun.security.util.Length;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by Administrator on 2017/9/21.
 * 用户信息
 */
@Entity
@Table(name = "c_user")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class User {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(length = 8)
    private Integer id;

    //客户名称,用户名称
    @Column(length = 64)
    private String name;

    @Column(length = 64)
    private String userName;

    //执照编号
    @Column(length = 64)
    private String licenseNumber;

    //执照路径
    @Column(length = 128)
    private String licenseUrl;

    //法人
    @Column(length = 64)
    private String legalPerson;

    //公司地址
    @Column(length = 64)
    private String address;

    //电话
    @Column(length = 64)
    private String tel;

    //联系人
    @Column(length = 64)
    private String linkMan;

    //联系人电话
    @Column(length = 64)
    private String mobile;

    //邮箱
    @Column(length = 64)
    private String email;

    //座机号
    @Column(length = 64)
    private String phone;
    //客户服务经理
    @Column(length = 64)
    private String serverManager;

    //user类型（1,超级管理员；2，客户管理员;3.普通用户）
    @Column(length = 64)
    private int type;

    //创建时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(updatable = false)
    private Date createTime;

    //修改时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;

    //密码
    @Column(length = 64)
    private String password;

    //关联客户id，用“，”分隔
    @Column(length = 64)
    private String clientId;

    @Column(length = 64)
    private String clientName;


    //所属场站id，用，分隔
    @Column(length = 64)
    private String stationId;

    //备注
    @Column(length = 1024)
    private String remake;

    //是否删除,默认0，1表示删除，0表示未删除
    @Column(length = 2)
    private int isDel;
}
